<?xml version="1.0" encoding="windows-1251"?>
<!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN"
  "http://colorer.sf.net/2003/hrc.dtd">
<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd">
  <annotation><documentation>
    JavaCC Syntax
  </documentation><contributors><![CDATA[
    Giulio Piancastelli <gpian@softhome.net>
  ]]></contributors></annotation>

  <type name="javacc">

    <import type="def"/>

    <region name='PackageOutline' parent='def:Outlined'/>
    <region name='ImportOutline' parent='def:Outlined'/>

    <region name='ClassOutline' parent='def:Outlined'/>
    <region name='InnerClassOutline' parent='def:Outlined'/>
    <region name='InterfaceOutline' parent='def:Outlined'/>
    <region name='MethodOutline' parent='def:Outlined'/>
    <region name='NativeOutline' parent='def:Outlined'/>

    <region name='StringEscape' parent='def:StringContent'/>
    <region name='KeywordModifier' parent='def:Keyword'/>

    <!-- GP: JavaCC specific schemes -->
    <scheme name="javacc">
      <inherit scheme="java:JavaComments"/>
      <!-- How to let the first bracket be in the line below 'options' and the two brackets to match? -->
      <block start="/^ \s* (options) \s* (\{)/x" end="/\}/" scheme="options" region="def:Text"
             region01="def:Keyword" region02="def:SymbolStrong"
             region10="def:SymbolStrong"/>
      <block start="/^ \s* (PARSER_BEGIN)(\()(\w)+(\))/x" end="/^ \s* (PARSER_END)(\()(\w)+(\))/x"
             scheme="java:java" region="def:Text"
             region00="def:PairStart" region01="def:Keyword" region02="def:SymbolStrong" region04="def:SymbolStrong"
             region10="def:PairEnd" region11="def:Keyword" region12="def:SymbolStrong" region14="def:SymbolStrong"/>
      <inherit scheme="JavaCCTypeDeclaration"/>
      <regexp match="/^\s*(?{Keyword}(TOKEN|SKIP|MORE|SPECIAL_TOKEN|TOKEN_MGR_DECLS)\s*):/" region="def:Symbol"/>
      <keywords region="def:Keyword">
        <word name="JAVACODE"/>
      </keywords>
    </scheme>

    <scheme name="JavaCCTypeDeclaration">
      <inherit scheme="TypeDeclaration"/>
    </scheme>

    <scheme name="options">
      <!-- This should be a smarter scheme of KEYWORD '=' (number|string|boolean) ';', but how to do it? -->
      <inherit scheme="def:DecNumber"/>
      <block start="/&#34;/" end="/&#34;|$/" scheme="java:StringContent" region="String"/>
      <keywords region="def:Directive">
        <word name="LOOKAHEAD"/>
        <word name="CHOICE_AMBIGUITY_CHECK"/>
        <word name="OTHER_AMBIGUITY_CHECK"/>
        <word name="STATIC"/>
        <word name="DEBUG_PARSER"/>
        <word name="DEBUG_LOOKAHEAD"/>
        <word name="DEBUG_TOKEN_MANAGER"/>
        <word name="OPTIMIZE_TOKEN_MANAGER"/>
        <word name="ERROR_REPORTING"/>
        <word name="JAVA_UNICODE_ESCAPE"/>
        <word name="UNICODE_INPUT"/>
        <word name="IGNORE_CASE"/>
        <word name="USER_TOKEN_MANAGER"/>
        <word name="USER_CHAR_STREAM"/>
        <word name="BUILD_PARSER"/>
        <word name="BUILD_TOKEN_MANAGER"/>
        <word name="SANITY_CHECK"/>
        <word name="FORCE_LA_CHECK"/>
        <word name="COMMON_TOKEN_ACTION"/>
        <word name="CACHE_TOKENS"/>
        <word name="OUTPUT_DIRECTORY"/>
      </keywords>
      <keywords region="def:BooleanConstant" ignorecase="no">
        <word name="true"/>
        <word name="false"/>
      </keywords>
      <keywords region="def:Symbol">
        <symb name="="/>
      </keywords>
      <keywords region="def:SymbolStrong">
        <symb name=";"/>
      </keywords>
    </scheme>
    <!-- GP: End -->

    <scheme name="TypeDeclaration">

       <!-- GP: JavaCC specific regexp for token definitions -->
       <regexp match="/&lt;\s*\w*\s*&gt;/" region="def:LabelStrong"/>
       <regexp match="/&lt;\s*\w*\s*:/" region="def:LabelStrong"/>
       <regexp match="/&lt;\s*#\w*\s*:/" region="def:Label"/>
       <!-- GP: End -->

       <inherit scheme="java:JavaComments"/>

       <regexp match="/ \b (?{Keyword}new) \s+ (?{InnerClassOutline}[\w_]+ [\w_:\$]*?) \M \s*\([^\(\)]*\) \s* ([\{]|$) /x"/>
       <!--
       <regexp match="/ \M\b native .+? (?{NativeOutline}[\w_]+ [\w_:\$]*?) \s*\( /x"/>
       -->

       <regexp match="/ \b (?{Keyword}interface) \s+ (?{InterfaceOutline}[\w_]+ [\w_:\$]*?) /x"/>
       <regexp match="/ \b (?{Keyword}class) \s+ (?{ClassOutline}[\w_]+ [\w_:\$]*?) /x"/>

       <inherit scheme="def:PairedBrackets">
          <virtual scheme="def:PairedBrackets" subst-scheme="TypeDeclaration"/>
       </inherit>

       <!-- numbers -->
       <inherit scheme="def:CHexNumber"/>
       <inherit scheme="def:FloatNumber"/>
       <inherit scheme="def:DecNumber"/>

       <!-- strings -->
       <block start="/&#34;/" end="/&#34;|$/" scheme="java:StringContent" region="String"/>
       <regexp match="/' \\u[\da-fA-F]{1,4} '/ix" region="Character"/>
       <inherit scheme="c:Character"/>

       <!-- Standard Symbols -->
       <keywords region="def:Error">
          <symb name="["/><symb name="]"/>
          <symb name="{"/><symb name="}"/>
          <symb name="("/><symb name=")"/>
          <symb name="*/"/>
       </keywords>
       <keywords region="def:Symbol">
          <symb name=";" region="def:SymbolStrong"/>
          <symb name="="/><symb name="+"/><symb name="-"/>
          <symb name="/"/><symb name="*"/>
          <symb name="&amp;"/><symb name="^"/>
          <symb name="|"/><symb name=":"/>
          <symb name=","/><symb name="."/>
          <symb name="!"/><symb name="~"/>
          <symb name="&lt;"/><symb name="&gt;"/>
          <symb name="%"/><symb name="?"/>
          <symb name="#"/><symb name="@"/>
       </keywords>
       <keywords region="def:Keyword">
          <word name="break"/>
          <word name="catch"/>
          <word name="case"/>
          <word name="continue"/>
          <word name="default"/>
          <word name="do"/>
          <word name="else"/>
          <word name="false"/>
          <word name="for"/>
          <word name="finally"/>
          <word name="if"/>
          <word name="interface"/>
          <word name="instanceof"/>
          <word name="new"/>
          <word name="null"/>
          <word name="return"/>
          <word name="switch"/>
          <word name="super"/>
          <word name="try"/>
          <word name="true"/>
          <word name="this"/>
          <word name="throw"/>
          <word name="while"/>
       </keywords>
       <keywords region="KeywordModifier">
          <word name='abstract'/>
          <word name='final'/>
          <word name='private'/>
          <word name='protected'/>
          <word name='public'/>
          <word name='static'/>
          <word name='strictfp'/>
          <word name="throws"/>
          <word name="extends"/>
          <word name="implements"/>
       </keywords>
       <keywords region="KeywordModifier">
          <word name='native'/>
          <word name='synchronized'/>
          <word name='threadsafe'/>
          <word name='volatile'/>
          <word name='transient'/>
       </keywords>
       <keywords region="def:TypeKeyword">
          <word name='boolean'/>
          <word name='byte'/>
          <word name='char'/>
          <word name='double'/>
          <word name='float'/>
          <word name='int'/>
          <word name='long'/>
          <word name='short'/>
          <word name='void'/>
       </keywords>
       <!-- GP: JavaCC keywords -->
       <keywords region="def:Keyword">
         <word name="LOOKAHEAD"/>
         <word name="IGNORE_CASE"/>
         <word name="EOF"/>
       </keywords>
       <!-- GP: End -->

       <inherit scheme="Keywords-javaccClasses"/>
       <inherit scheme="java:Keywords-j2seClasses"/>

       <regexp match="/\M \b (?{MethodOutline}[\:\w_*&amp;~]+?) \s* \( [^\)\(]*? \) [\w\s\{]*? $/x"/>
       <!-- return new Object(...) -->
       <regexp match="/^\s* \M \b ([\:\w_*&amp;~]+?\s+)+ (?{MethodOutline}[\:\w_*&amp;~]+?) \s* \( [^\)\(]*? \) \s* ; \s* $/x"/>

    </scheme>

    <!-- GP: JavaCC API classes -->
    <scheme name="Keywords-javaccClasses" if="javacc-classes">
       <keywords region="def:ClassKeyword">
         <word name="Token"/>
         <word name="ParseException"/>
       </keywords>
    </scheme>
    <!-- GP: End -->

  </type>
</hrc>
<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is the Colorer Library.
   -
   - The Initial Developer of the Original Code is
   - Giulio Piancastelli <gpian@softhome.net>.
   - Portions created by the Initial Developer are Copyright (C) 1999-2005
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either the GNU General Public License Version 2 or later (the "GPL"), or
   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the LGPL or the GPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->
